<%@ page import="java.sql.*,database.DBCon" %>
<%
		try {
			out.print(request.getParameter("login"));
			int isInserted = new DBCon(out).insertStudent(
					request.getParameter("fn"),//0
					request.getParameter("mn"),
					request.getParameter("ln"),
					request.getParameter("GPA"),//3
					request.getParameter("mp"),
					request.getParameter("email"),
					request.getParameter("login"),//6
					request.getParameter("pwd"),
					request.getParameter("aff"),
					request.getParameter("ek"));//9
            if (isInserted==1)
				{
				
			}
			else if (isInserted==2)
				{
				response.sendRedirect("../index.jsp?enrolment");
			}
			else
				response.sendRedirect("../index.jsp");
}
catch(Exception e)
{
    response.sendRedirect("../connectionFailed.jsp?"+e);
}
%>
